import React from 'react'
// import { withRouter } from 'react-router-dom'
import { PageHeader } from 'antd'
// import { History, Location } from 'history'

// import { routeMap } from '../Routes'
import Nav from './nav'



// interface Props {
//     children: React.ReactNode,
//     history: History,
//     location: Location,
//     title: string,
//     subtitle: string,
// }
const Layout = ({ title, subtitle, children }: { title: string, subtitle: string, children: JSX.Element | JSX.Element[] }) => {
    // let [currPage] = routeMap.filter(route => {
    //     return route.path === props.location.pathname
    // })
    return (
        <div>
            <Nav></Nav>
            <PageHeader title={title} subTitle={subtitle}></PageHeader>
            <div style={{ width: '85%', margin: '0 auto' }}>{children}</div>
        </div>
    )
}

export default Layout